package com.danco.training.bookshop.entity.storage;


import java.io.Serializable;

import com.danco.training.bookshop.service.storage.BookStorageService;
import com.danco.training.bookshop.service.storage.ClaimStorageService;
import com.danco.training.bookshop.service.storage.OrderStorageService;

public class Bookshop implements Serializable{


	
	/**
	 * 
	 */
	private static final long serialVersionUID = -2386224790479557201L;
	
	private BookStorageService bookStorageService;
	private OrderStorageService orderStorageService;
	private ClaimStorageService claimStorageService;
	
	private BookStorage bookStorage;
	private ClaimStorage claimStorage;
	private OrderStorage orderStorage;
	
	private static Bookshop bookshopInstance;

	private Bookshop() {
		bookStorageService = BookStorageService.getBookStorageSeviceInstance();
		orderStorageService = OrderStorageService.getOrderStorageServiceInstance();
		claimStorageService = ClaimStorageService.getClaimStorageServiceInstance();
		setBookStorage(BookStorage.getBookStorageInstance());
		setClaimStorage(ClaimStorage.getClaimStorageInstance());

		setOrderStorage(OrderStorage.getOrderStorageInstance());
	}

	public BookStorageService getBookStorageService() {
		return bookStorageService;
	}

	public void setBookStorageService(BookStorageService bookStorageService) {
		this.bookStorageService = bookStorageService;
	}

	public OrderStorageService getOrderStorageService() {
		return orderStorageService;
	}

	public void setOrderStorageService(OrderStorageService orderStorageService) {
		this.orderStorageService = orderStorageService;
	}

	public ClaimStorageService getClaimStorageService() {
		return claimStorageService;
	}

	public void setClaimStorageService(ClaimStorageService claimStorageService) {
		this.claimStorageService = claimStorageService;
	}

	public static Bookshop getBookshopInstance() {
		if (bookshopInstance == null){
			bookshopInstance = new Bookshop();
		}
		return bookshopInstance;
	}

	public BookStorage getBookStorage() {
		return bookStorage;
	}

	public void setBookStorage(BookStorage bookStorage) {
		this.bookStorage = bookStorage;
	}

	public ClaimStorage getClaimStorage() {
		return claimStorage;
	}

	public void setClaimStorage(ClaimStorage claimStorage) {
		this.claimStorage = claimStorage;
	}

	public OrderStorage getOrderStorage() {
		return orderStorage;
	}

	public void setOrderStorage(OrderStorage orderStorage) {
		this.orderStorage = orderStorage;
	}

	

	
	
}